Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 5.5.38
-
Fix Version/s: N/A
-
Component/s: Data Definition - Alter Table
-
Labels:None
-
Environment:All
Description
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. "
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I'm not sure I understand the nature of the complaint, could you please elaborate on it? In particular,
This is an odd way to determine whether the options work or not.
Or, did you mean that the comments were wrong and must be removed?
The manual page that you quoted also gives a link to another page which explains in more detail what the option means:
http://dev.mysql.com/doc/refman/5.5/en/view-updatability.html
It also gives examples which are easy to verify. The option seems to work as described in the manual.
What ambiguous statements, how will they diverge in behavior, and what needs to be implemented to make it happen? Please provide examples.
Regardless the particular change we are talking about, it always happens whenever new functionality is implemented – the old slave is bound to fail when the new master uses new features, that's why NM=>OS replication is not guaranteed, even though there are continuous efforts to make it break as little as possible.
The comments are internal, and they don't say that they suggest the exact syntax; besides, how do you know that they refer to the "WITH CHECK OPTION"? 10 years ago people could think about lots of things when they wrote those comments, for example they could be planning to extend foreign keys syntax (which does have CASCADE/RESTRICT) onto views. We can try to ask them and see if they remember what the comments were about, if you insist it's important.