| Bug #6229 | Inconsistent handling of DEFAULT on a NOT NULL column | ||
|---|---|---|---|
| Submitted: | 23 Oct 2004 19:26 | Modified: | 28 Apr 2005 16:42 |
| Reporter: | Trudy Pelzer | ||
| Status: | To be fixed later | ||
| Category: | Server: DML | Severity: | S3 (Non-critical) |
| Version: | 5.0.2-debug | OS: | Linux (SuSE 9.1) |
| Assigned to: | Ramil Kalimullin | Target Version: | |
[23 Oct 2004 19:26]
Trudy Pelzer
[23 Oct 2004 20:37]
Miguel Solorzano
Verified against latest BK source.
[3 Feb 2005 2:59]
Jim Winstead
i disagree with the premise of this bug -- default(col) for a column that has no default should always be an error. the documentation says this explicitly.
[28 Apr 2005 16:42]
Michael Widenius
I agree with Jim here. We should keep the current behavior for now. The reason are: - 5.0 is already in beta and we should do any behavior changes (if things are not really critical, which this is not) - DEFAULT(column_name) is a new function in 5.0 for which we can be more strict with this than before - We do in not strict mode generate warnings for the cases () and (default) so the users will have a chance to notice the error. - With our current code, it's not trivial to change "VALUES (DEFAULT) " to give an error in this case (becasue we don't know in fix_fields which column this is refering to). In the future we should look at also giving errors for VALUES() and VALUES(DEFAULT) in not strict mode I have updated the manual regarding this issue.
